package com.atguigu.spzx.cloud.feign.api;

import com.atguigu.spzx.cloud.model.entity.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Author yaya
 * @Create 2024/7/1 19:38
 * Description:
 */
@FeignClient("spzx-cloud-user")
// 不可以加上这个注解
// @RequestMapping("/api/user")
public interface UserFeignClient {

    /**
     * 调用user的接口
     * @param userId
     * @return
     */
    @GetMapping(value = "/api/user/findUserByUserId/{userId}")
    User findUserByUserId(@PathVariable(value = "userId") Long userId);

}
